$wgGroupPermissions['user']['reupload'] = true;
$wgGroupPermissions['user']['reupload-shared'] = true;
$wgGroupPermissions['user']['minoredit'] = true;
-$wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok"
+$wgGroupPermissions['user']['purge'] = true;
$wgGroupPermissions['user']['sendemail'] = true;
$wgGroupPermissions['user']['applychangetags'] = true;
$wgGroupPermissions['user']['changetags'] = true;
global $wgRequest, $wgUser;
$purge = $wgRequest->getVal( 'action' ) === 'purge';
+ // Allow users with 'purge' right to clear feed caches
if ( $purge && $wgUser->isAllowed( 'purge' ) ) {
$cache = ObjectCache::getMainWANInstance();
$cache->delete( $timekey, 1 );
*/
/**
- * User-requested page cache purging.
- *
- * For users with 'purge', this will directly trigger the cache purging and
- * for users without that right, it will show a confirmation form.
+ * User-requested page cache purging
*
* @ingroup Actions
*/
return $this->page->doPurge();
}
- /**
- * purge is slightly weird because it can be either formed or formless depending
- * on user permissions
- */
public function show() {
$this->setHeaders();
return;
}
- if ( $user->isAllowed( 'purge' ) ) {
- // This will update the database immediately, even on HTTP GET.
- // Lots of uses may exist for this feature, so just ignore warnings.
- Profiler::instance()->getTransactionProfiler()->resetExpectations();
-
+ if ( $this->getRequest()->wasPosted() ) {
$this->redirectParams = wfArrayToCgi( array_diff_key(
$this->getRequest()->getQueryValues(),
[ 'title' => null, 'action' => null ]